import Vue from 'vue'
import App from './App.vue'
import router from './router'
import global from './constant/Global'
import axios from './util/Axios'

import moment from 'moment'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

// qs
import qs from 'qs'

// api
import api from './config/api'

// 全局变量
Vue.prototype.$GLOBAL = global

// Element UI
Vue.use(ElementUI)

// 时间格式化
Vue.prototype.$DateTimeFormat = moment

// Axios
Vue.prototype.$axios = axios

Vue.prototype.$qs = qs

Vue.prototype.$API = api

Vue.config.productionTip = false

let VueContext = new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

// 将Vue实例导出
export default VueContext
